package com.xmotor.testjavaxvalidation.controller;

import com.xmotor.testjavaxvalidation.vo.InnerVO;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @Description
 * @Author Dang Xianyue
 * @Date 2020-08-29 15:42
 * @Version 1.0
 */
@RestController
@RequestMapping("/v3")
public class TestControllerV3 {

    @RequestMapping("/testJSON")
    public void testJSON(@RequestBody @Valid InnerVO param) throws Exception{
        System.out.println("testJSON:"+param);
    }

    @RequestMapping("/testForm")
    public void testForm(@Valid InnerVO param) throws Exception{
        System.out.println("testForm:"+param);
    }
}
